/* 
* File: vector_empty.cpp
* 测试用例修改自 http://www.cplusplus.com/reference/stl/vector/vector/empty/
* 编译命令：
* 	c++ -Wall -g  -I ../Include/ vector_empty.cpp -o vector_empty 
* 在这里假设所有的所需的头文件放在../Include里面
*/
// vector::empty
#include <iostream>
#define vector Vector
#include "Vector.h"
using namespace std;

int main ()
{
	vector<int> myvector;
	int sum (0);

	for (int i=1;i<=10;i++) myvector.push_back(i);

	while (!myvector.empty())
	{
		sum += myvector.back();
		myvector.pop_back();
	}

	cout << "total: " << sum << endl;

	return 0;
}
